package com.changli11.wrapper.exer1;

import java.util.Scanner;
import java.util.Vector;

public class ScoreTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner (System.in);
        Vector v= new Vector();
//        int n = sc.nextInt();
        int maxScore = 0;
        while(true) {
            int score = sc.nextInt();
                if(score <0){
                    break;
                }
                v.addElement(score);
                if(score > maxScore){
                    maxScore = score;
                }
//            v.add(score);

        }
        for(int i=0; i<v.size(); i++){
            int currentScore = (int)v.elementAt(i);
            char grade = ' ';
            if(maxScore - currentScore < 10){
                grade = 'A';
            }
            else if (maxScore - currentScore <20){
                grade = 'B';
            }
             else if (maxScore - currentScore <30){
                 grade = 'C';
            }
             else {
                 grade = 'D';
            }
            System.out.println("student"+i+"score is "+currentScore+",grade is "+grade);
        }
        sc.close();
//        v.sort();
    }
}
